System.register(["@angular/core"], function (exports_1, context_1) {
    "use strict";
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __metadata = (this && this.__metadata) || function (k, v) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };
    var __moduleName = context_1 && context_1.id;
    var core_1, DisabledDirct, InnerHtmlDirct, CheckedDirct, DirectivesM;
    return {
        setters: [
            function (core_1_1) {
                core_1 = core_1_1;
            }
        ],
        execute: function () {
            DisabledDirct = (function () {
                function DisabledDirct(elRef) {
                    this.elRef = elRef;
                    this.el = elRef.nativeElement;
                }
                Object.defineProperty(DisabledDirct.prototype, "disabled", {
                    set: function (v) {
                        this.el.disabled = v ? "disabled" : null;
                    },
                    enumerable: true,
                    configurable: true
                });
                ;
                return DisabledDirct;
            }());
            DisabledDirct = __decorate([
                core_1.Directive({
                    selector: '[disabled]',
                    inputs: ['disabled']
                }),
                __metadata("design:paramtypes", [core_1.ElementRef])
            ], DisabledDirct);
            InnerHtmlDirct = (function () {
                function InnerHtmlDirct(elRef) {
                    this.elRef = elRef;
                    this.el = elRef.nativeElement;
                }
                Object.defineProperty(InnerHtmlDirct.prototype, "html", {
                    set: function (v) {
                        this.el.innerHTML = v;
                    },
                    enumerable: true,
                    configurable: true
                });
                ;
                return InnerHtmlDirct;
            }());
            InnerHtmlDirct = __decorate([
                core_1.Directive({
                    selector: '[html]',
                    inputs: ['html']
                }),
                __metadata("design:paramtypes", [core_1.ElementRef])
            ], InnerHtmlDirct);
            CheckedDirct = (function () {
                function CheckedDirct(elRef) {
                    this.elRef = elRef;
                    this.el = elRef.nativeElement;
                }
                Object.defineProperty(CheckedDirct.prototype, "val", {
                    set: function (v) { this.v = v; this.checked(); },
                    enumerable: true,
                    configurable: true
                });
                Object.defineProperty(CheckedDirct.prototype, "vals", {
                    set: function (v) { this.vs = v; this.checked(); },
                    enumerable: true,
                    configurable: true
                });
                CheckedDirct.prototype.checked = function () {
                    var _this = this;
                    if (this.vs && this.v) {
                        var result = this.vs.filter(function (o) {
                            if (!o)
                                return false;
                            return Object.keys(_this.v).every(function (k) {
                                return o[k] == _this.v[k];
                            });
                        });
                        if (result && result.length > 0) {
                            this.el.setAttribute("checked", "");
                        }
                    }
                    else {
                        this.el.removeAttribute("checked");
                    }
                };
                return CheckedDirct;
            }());
            CheckedDirct = __decorate([
                core_1.Directive({
                    selector: '[val]',
                    inputs: ['val', 'vals']
                }),
                __metadata("design:paramtypes", [core_1.ElementRef])
            ], CheckedDirct);
            DirectivesM = (function () {
                function DirectivesM() {
                }
                return DirectivesM;
            }());
            DirectivesM = __decorate([
                core_1.NgModule({
                    declarations: [DisabledDirct, InnerHtmlDirct, CheckedDirct],
                    exports: [DisabledDirct, InnerHtmlDirct, CheckedDirct]
                }),
                __metadata("design:paramtypes", [])
            ], DirectivesM);
            exports_1("DirectivesM", DirectivesM);
        }
    };
});
